<!--注册证照-->
<style scoped lang="less">
  .r-txt {
    text-align: right;
    width:75%;
  }
</style>

<template>
  <div class="contain">
    <!-- <div class="text-list mb30">
       <li class="displayflex">
        <span class="l-txt flex1">生产来源</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="国产">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">商品名称</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="十五项遗传性耳聋相关基因检测试盒">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">注册证号</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="国食药监械（准）字2012第2660091（更）">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">生产厂家</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="上海治舒医用防护用品有限公司">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">发证日期</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="2012-07-10">
      </li>
      <li class="displayflex">
        <span class="l-txt flex1">有效期至</span>
        <input v-bind:readonly="viewOnly" class="r-txt" value="2022-07-10">
      </li> 
    </div>-->

    <uploader :title="'注册证照'" :img-list="imgList" :max="max"></uploader>
  </div>
</template>

<script>
import uploader from '@/components/share/imageUploader/imageUploader.vue';
export default {
  name: 'RegistryKey',
  components: {
    uploader,
  },
  data() {
    return {
      viewOnly: true,
      imgList: [],
      max:9,

      data:{},
    };
  },
  watch: {
  },
  computed: {
    userinfo(){
      return localStorage.getItem('userinfo') === null?null:JSON.parse(localStorage.getItem('userinfo'));
    }
  },
  created() {
    this.SetPageType();
    this.GetData();
  },
  mounted() {
    this.$nextTick(function() {
    });
  },
  methods: {
    GetData(){
      this.Ajax.post(`/wxh/excsupplier/${this.$route.query.Guid}/productpic`).then((res) => {
        if (res.errorCode == 0) {
          let data = res.data;
          if(data) {
            this.imgList = data;
          }
        } else {
          this.Toast({
            message: res.message || '操作异常，请稍后重试',
          });
        };
      });
    },

    SetPageType(){
      if(this.viewOnly){
        this.max = 0;
      }
    }
  }
  
}
</script>
